// 用户信息
import Actions from '../constants/actions.js'
const initialState = {
};
function credential(state=initialState,action){
    switch (action.type) {
        case Actions.SEND_REQUEST:
            return Object.assign({},state,action.body)
            // return {...state,action.body}
            break;
        case Actions.CHECKLOGIN_RECEIVE:
            return Object.assign({},state,action.body)
            break;
        case Actions.RECEIVE_USERINFO:
            return Object.assign({},state,action.body)
            break;
        case Actions.RECEIVE_USERCONFIGURESTATUS:
            // console.log('action: '+JSON.stringify(action))
            // console.log('state: '+JSON.stringify(state))
            let newState = Object.assign({},state,action.body)
            // console.log('newState:'+JSON.stringify(newState))
            return newState;
            break;
        default:
            return state;
    }
}

export default credential
